package main.chapter2

fun main() {
    printHello
    println(sum(1,3))
    println(sum.invoke(4,5))

    val array:Array<Any> = arrayOf(1,3,"a",'*')
    array.forEach(::println)

}

private val sum = { arg1: Int, arg2: Int ->
    println("$arg1+$arg2=${arg1 + arg2}")
    arg1 + arg2
}

val printHello = {
    println("Hello")
}
